#ifndef SHOWPIC_H
#define SHOWPIC_H

#include <QMainWindow>
#include <QDir>
#include <QFileInfoList>
#include <QPixmap>
#include <QResizeEvent>
namespace Ui {
class showpic;
}

class showpic : public QMainWindow
{
    Q_OBJECT

public:
    explicit showpic(QWidget *parent = nullptr);
    ~showpic();

private slots:
    void on_pushButton_clicked();   // 返回相机
    void on_pushButton_2_clicked(); // 上一张
    void on_pushButton_3_clicked(); // 下一张

private:
    Ui::showpic *ui;
    QFileInfoList imageList;
    int currentIndex = 0;

    void loadImages();
    void showCurrentImage();
protected:
    // 添加 resizeEvent 函数声明
    void resizeEvent(QResizeEvent *event) override;
};

#endif // SHOWPIC_H
